package com.hxzy.shiro;

import com.hxzy.entity.DictData;
import com.hxzy.service.DictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 通用数据字典类说明
 *
 * @author admin
 * @date 2021-09-07
 */
@Component(value = "dict")
public class DictService {

    @Autowired
    private DictDataService dataService;


    /**
     * 根据前端提供dict_type值，sys_dict_data表的数据
     * @param dictType
     * @return
     */
    public List<DictData> getType(String dictType){
          return this.dataService.findDictDataByType_api(dictType);
    }

}
